package com.thread;

public class MyRunnable3 implements Runnable{
    private static int money;
    @Override
    public void run() {
        for (int i = 0; i <3 ; i++) {
            synchronized (this){
                money+=100;
                System.out.println(Thread.currentThread().getName()+money);
            }
        }
    }
}
